{% extends 'goods/base.html' %}
{% load static %}
{% block aa %}
    <div class="content inner">
    <section class="item-show__div clearfix">
        <div class="pull-left">
            <div class="item-list__area clearfix">
                {% for i in page %}
                    <div class="item-card">
                        <a href="{% url 'goods:item_show' qid=i.object.id %}" class="photo">
                            <img src="{{ i.object.image }}" alt="{{ i.object.name }}" class="cover">
                            <div class="name">{{ i.object.name }}</div>
                        </a>
                        <div class="middle">
                            <div class="price">
                                <small>￥</small>
                                {{ i.object.price }}</div>
                            <div class="sale"><a href="{% url 'shippingcart:udai_shopcart' %}">加入购物车</a></div>
                        </div>
                        <div class="buttom">
                            <div>销量 <b>{{ i.object.code }}</b></div>
                            <div>人气 <b>{{ 888 }}</b></div>
                            <div>评论 <b>{{ i.object.details }}</b></div>
                        </div>
                    </div>
                    {% empty %}
                        <h1 style="text-align: center;color: red;margin-top: 50px">温馨提示</h1>
                        <h1 style="text-align: center;margin-top: 60px">物品不存在，请重新输入关键字进行搜索...</h1>
                {% endfor %}
            </div>
            <!-- 分页 -->
            <div class="page text-right clearfix" style="text-align: center">
                {% if page.has_previous %}
				<a href="{% url 'haystack_search' %}?q={{ query }}&amp;page={{page.previous_page_number}}" aria-label="Previous">
					<span aria-hidden="true">&laquo;</span></a>
            {% endif %}
                {% for pindex in page.paginator.page_range %}
                    {% if pindex == page.number %}
                        <a href="{% url 'haystack_search' %}?page=1" aria-label="Previous" class="select">
                        {{ pindex }}
                        </a>
                    {% else %}
                        <a href="{% url 'haystack_search' %}?q={{ query }}&amp;page={{ pindex }}">{{ pindex }}</a>&nbsp;&nbsp;
                    {% endif %}
                {% endfor %}
            {% if page.has_next %}
                 <a href="{% url 'haystack_search' %}?q={{ query }}&amp;page={{page.next_page_number}}" aria-label="Next">
                      <span aria-hidden="true">&raquo;</span></a>
              {% endif %}
            </div>
        </div>
        <div class="pull-right">
            <div class="desc-segments__content">
                <div class="lace-title">
                    <span class="c6">爆款推荐</span>
                </div>
                <div class="picked-box" style="height: 1280px;overflow: hidden">
                    {% for foo in page %}
                        <a href="{% url 'goods:item_show' qid=foo.object.id %}" class="picked-item"><img src="{{ foo.object.image }}" alt="{{ foo.object.name }}" class="cover"><span
                            class="look_price">¥{{ foo.object.price }}</span></a>
                    {% endfor %}
                </div>
            </div>
        </div>
    </section>
</div>
{% endblock %}




